package com.hspedu.spring.bean;

/**
 * @Author: lihaojie
 * @Description:
 * @DateTime: 2024/2/7 15:46
 **/
public class Car {

    private Integer id;

    private String name;

    private Integer price;

    public Car() {
        System.out.println("car被初始化了...");
    }

    public Car(Integer id, String name, Integer price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public Integer getId() {
        return id;
    }

    /*public void setId(Integer id) {
        this.id = id;
    }*/

    public String getName() {
        return name;
    }

    /*public void setName(String name) {
        this.name = name;
    }*/

    public Integer getPrice() {
        return price;
    }

    /*public void setPrice(Integer price) {
        this.price = price;
    }*/

    @Override
    public String toString() {
        return "Car{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                '}';
    }
}
